package com.wn.dao;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component("aroundAdvice")
@Aspect
public class AroundAdvice {
    @Pointcut("execution(* com.wn.dao.*.*(..))")
    private void  myPointCut(){}
    @Around("myPointCut()")
    public Object aroundAdviceMethod(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
        System.out.println("……………………………………………………………………………………………………………………………………………………………………………………");
        System.out.println("我是个单纯的环绕通知，方法前通知");
        Object proceed = proceedingJoinPoint.proceed();
        System.out.println("我是个单纯的环绕通知，方法后通知");
        return proceed;
    }


}
